package com.fqgj.xjd.user.client.enums;

/**
 * 绑卡状态
 */
public enum UserCardStatusEnum {
    INIT(0, "init"),
    CHECK_SUCCESS(1, "bind success"),
    CHECK_FAIL(2, "re-bind"),
    RE_EDIT(3, "re-edit");

    int status;
    String desc;

    UserCardStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public UserCardStatusEnum setStatus(int status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public UserCardStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static UserCardStatusEnum getEnumByStatus(Integer status) {
        UserCardStatusEnum aadhaarStatusEnum = null;
        for (UserCardStatusEnum enumObj : UserCardStatusEnum.values()) {
            if (enumObj.getStatus() == status) {
                aadhaarStatusEnum = enumObj;
                break;
            }
        }
        return aadhaarStatusEnum;
    }
}
